home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
thinkref
/
archive
/
THINKPascalUH2.1.sea
/
THINKPas Univ Hdr 2.1
/
Interfaces
/
ShutDown.p
< prev
next >
Wrap
Text File
|
1995-09-12
|
2KB
|
92 lines
{ Converted with MPW2TPas Tuesday, September 12, 1995 9:57:00 PM }
{
File: ShutDown.p
Contains: Shutdown Manager Interfaces.
Version: Technology: System 7.5
Package: Universal Interfaces 2.1 in “MPW Latest” on ETO #18
Copyright: © 1984-1995 by Apple Computer, Inc.
All rights reserved.
Bugs?: If you find a problem with this file, use the Apple Bug Reporter
stack. Include the file and version information (from above)
in the problem description and send to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
}
UNIT ShutDown;
INTERFACE
{$IFC UNDEFINED __SHUTDOWN__}
{$SETC __SHUTDOWN__ := 1}
USES
ConditionalMacros, Types, MixedMode;
{ $PUSH}
{ $ALIGN MAC68K}
{ $LibExport+}
CONST
sdOnPowerOff = 1; {call procedure before power off.}
sdOnRestart = 2; {call procedure before restart.}
sdOnUnmount = 4; {call procedure before unmounting.}
sdOnDrivers = 8; {call procedure before closing drivers.}
sdRestartOrPower = 3; {call before either power off or restart.}
TYPE
{
ShutDwnProcPtr uses register based parameters on the 68k and cannot
be written in or called from a high-level language without the help of
mixed mode or assembly glue.
In:
=> shutDownStage D0.W
}
ShutDwnProcPtr = Register68kProcPtr; { register PROCEDURE ShutDwn(shutDownStage: INTEGER); }
ShutDwnUPP = UniversalProcPtr;
CONST
uppShutDwnProcInfo = $00001002; { Register PROCEDURE (2 bytes in D0); }
FUNCTION NewShutDwnProc(userRoutine: ShutDwnProcPtr): ShutDwnUPP;
{$IFC NOT GENERATINGCFM }
INLINE $2E9F;
{$ENDC}
PROCEDURE CallShutDwnProc(shutDownStage: INTEGER; userRoutine: ShutDwnUPP);
{$IFC NOT GENERATINGCFM}
{To be implemented: Glue to move parameters into registers.}
{$ENDC}
PROCEDURE ShutDwnPower;
{$IFC NOT GENERATINGCFM}
INLINE $3F3C, $0001, $A895;
{$ENDC}
PROCEDURE ShutDwnStart;
{$IFC NOT GENERATINGCFM}
INLINE $3F3C, $0002, $A895;
{$ENDC}
PROCEDURE ShutDwnInstall(shutDownProc: ShutDwnUPP; flags: INTEGER);
{$IFC NOT GENERATINGCFM}
INLINE $3F3C, $0003, $A895;
{$ENDC}
PROCEDURE ShutDwnRemove(shutDownProc: ShutDwnUPP);
{$IFC NOT GENERATINGCFM}
INLINE $3F3C, $0004, $A895;
{$ENDC}
{ $ALIGN RESET}
{ $POP}
{$ENDC} {__SHUTDOWN__}
IMPLEMENTATION
END.